

<template>
  <div class="category">
    <h3> {{title}} 分类</h3>
    <!--默认插槽-->
    <slot></slot>
    <!--具名插槽 使用时需指定插槽名称-->
    <slot class="foot" name="footer"></slot>
    <!-- 作用域插槽 -->
    <slot :games="games"></slot>
  </div>
</template>

<script >
export default {
  name: 'Category',
  data() {
    return {
      games: ['穿越火线','英雄联盟','王者荣耀'],
    }
  },
  props: {
    title: String,
    listData: Array
  }
}

</script>
<style scoped>
 .category {
   background-color: skyblue;
   width: 250px;
   height: 500px;
 }
 h3 {
  text-align: center;
   background-color: orange;
}
 .foot {
   text-align: center;
   display: flex;
   background-color: yellow;
 }
</style>